package com.dynamictpm.notify;


import java.util.concurrent.Executor;

/**
 * 描述：： 订阅
 * <p>
 * ------------------------------------
 *
 * @program: dynamic-tpm
 * @ClassName Subscriber
 * @author: it-yml
 * @create: 2023-07-05 16:10
 * @Version 1.0
 * --------------------------------------
 **/
public abstract class Subscriber<T extends Event> {

    /**
     * Event callback.
     *
     * @param event
     */
    public abstract void onEvent(T event);

    /**
     * Type of this subscriber's subscription.
     *
     * @return
     */
    public abstract Class<? extends Event> subscribeType();

    public Executor executor() {
        return null;
    }
}
